home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 11 / Mac Magazin and MacEasy Magazine CD - Issue 11.iso / Diskette Mac MAGAZIN / Knot 2.1 / Knot 2.1 Manual < prev    next >
Text File  |  1995-01-20  |  19KB  |  291 lines

  1. Knot 2.1 Manual
  2.  
  3. What is Knot?
  4.  
  5. Knot lets you create large color pictures of beautiful abstract knots. You design the knot’s form and colors, and choose the backgrounds and lighting.
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19. What’s a knot?
  20.  
  21. The above picture is a knot, but it’s hard to describe – a knot is made of several strands, and a strand is a sort of swoopy, spirally, wiggly tube-like thing. “It looks like intestines” is the least queasily anatomical comment anyone’s ever made about a knot.
  22.  
  23. You can design knots, preview the results, and when you’re satisfied, render the final picture. Knot creates a fully shaded drawing and saves it directly to disk. To view the picture, you need a paint program capable of viewing 24-bit (millions of colors) TIFF files, like Photoshop or Color-It.
  24.  
  25. Is it really slow?
  26.  
  27. On a Color Classic, an average knot takes five or six minutes to draw; on a Power Mac, it zips right along. Knot 2.1 can run in the background, and you can control how much of your computer’s attention you’re willing to let it have. Previews are quickly available.
  28.  
  29. But the wait is worth it: the resulting colorful pictures make pretty desktop backgrounds, and are even more fun to blow up into posters.
  30.  
  31. Are strands hard to design?
  32.  
  33. Not as hard as it first looks. At first, a strand design looks like The Parametric Equation That Ate Tokyo, but it’s all explained in this manual. All you have to say is how far the strand swings around the equator, how much it bobs up and down across the equator, and how much its distance from the center wiggles in and out. 
  34.  
  35. It turns out that if you choose these values cleverly, you can get surprisingly complicated strands. There are also example knots to check out, and the program can automagically generate strands for you.
  36.  
  37.  
  38. The manual contains these sections:
  39.  
  40. •    “Let me at it!”
  41. • “Tell me more.”
  42. • “What are the other controls?”
  43. • “I’m having trouble.”
  44. • “What else is there to know?”
  45.  
  46.  
  47. Let me at it!
  48.  
  49. Not to waste your time, here’s the fastest possible explanation, which assumes you’re totally at ease with your Mac, with 3-D graphics, and with parametric equations expressed in spherical coordinates. Otherwise, skip to the “Tell me more” section of the manual.
  50.  
  51. Launch the program. An untitled window appears, containing one strand. (A picture of this window appears in the next part of the manual.)
  52.  
  53. The strand is represented by a little three-lobed icon in the scrolling list. (The color of this icon is the color of the strand, but the shape is not. All strands have this same icon.)
  54.  
  55. You can change the color of the strand by clicking in the Color square, or by double-clicking the strand. By moving those three sliders, or by checking the checkbox by the rainbow, you can change the appearance the strand’s substance. A preview of the strand-substance is updated whenever you click the flat square above the word “Previews.”
  56.  
  57. The shape of the strand is defined by all those numbers at the bottom. W is the independent variable, and during drawing it ranges from 0 to pi; the sine functions work in radians; there are 2*pi radians in a complete circle. The sphere in the preview square is swept along the path defined by these equations, creating a strand.
  58.  
  59. There’s an equation for each of theta, radius, and phi. In this program, theta is the longitude; theta=0 lies in a direction that points away from you  (at least, it does when the knot is untilted), and, seen from above the equator, theta increases in a clockwise direction.
  60.  
  61. Phi is the latitude. Where phi=0, the path is on the equator; phi= pi/2 put the path at the north pole, and phi=-pi/2 puts it at the south pole.
  62.  
  63. The radius is expressed in pixels. It has a constant part, and a ‘wiggle’ part that’s a function of w. Phi works the same way, except that it’s an angle. 
  64.  
  65. For both the radius and phi, the number in the first column is a constant offset. The second column is the magnitude of the wiggle; the third is a constant phase offset for the wiggle, and the fourth is the frequency of the wiggle. The higher this fourth number, the more wiggles.
  66.  
  67. Theta has no wiggle part – only a constant plus a linear function of w. (Wiggles in theta are less useful.)
  68.  
  69. It’s OK to type large, negative, fractional, or otherwise weird numbers here. If you type something that isn’t a number at all, though, the program will beep at you and highlight your mistake the next time you try to make a preview or a drawing.
  70.  
  71. You can tilt strands individually (rather than tilting the whole knot) by dragging the ball-like Tilt controller. This will make the strand tip in the direction you indicate. To flip the indicator from the near side of the ball to the far side, or back, drag the mouse from inside the ball to outside, and then back inside – as if you were swooping the tip of the line around the edge of the ball. Pressing that little round button restores the orientation to straight up-and-down.
  72.  
  73. You can get a wireframe preview of  your strand by clicking in the black square under the word ‘Previews’. If you click the pencil button, you get a preview of all the strands at once. This preview also has two little buttons to change the zoom level, and the dark gray rectangle shows where the edge of the picture is. If the knot doesn’t fit in that rectangle, that means that planned size of the drawing is too small. You can fix that in the environment window, which is explained below, in the section “What other controls are there?”
  74.  
  75. You can make new strands – up to 100 – with the New Strand command in the Knots menu.
  76.  
  77. About copying and pasting: if you have some text selected, then Cut, Copy, and Clear will work on the text. If you have no text selected, then those commands work on the selected strand. Paste will paste whatever happens to be on the Clipboard.
  78.  
  79.  
  80. Tell me more.
  81.  
  82. Designing your first strand
  83.  
  84. Launch Knot. You should see a window called ‘Untitled-1’. Click on the big black square at right, under the word ‘Previews’.
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109. Well, that was easy. Your new strand is a simple ring: every time you create a new document, it will have one of these rings in it, just to get you started.
  110.  
  111. If you click in the square above the word ‘Previews’, you’ll see what the strand’s substance looks like. To change its color, click in the box marked ‘Color’ to bring up a color wheel. You can also get the color wheel by double-clicking on the little three-lobed icon in the scrolling list on the left. This little icon represents  your strand – it has the right color, but not the right shape.
  112.  
  113. You can change the substance even more with the three sliders. ‘Roughness’ lets you choose a glossy or chalky surface. ‘Metallic Quality’ lets you add metallic glints, or just some variation of hue across the surface. ‘Diameter’ controls the thickness of the strand, and the checkbox by the rainbow adds a slight iridescent quality to the color. To see the effect of these changes, click in the top preview square.
  114.  
  115. You can tilt all the strands in a knot in different directions. Try dragging the mouse across the ‘Pole’s Tilt’ control to get a new tilt, and then clicking the bottom preview square to see the result. The pole of this strand runs up and down through its center, like a pencil skewering a doughnut.
  116.  
  117. To flip the indicator from the near side of the ball to the far side, or back, drag the mouse from inside the ball, to outside, and then back inside – as if you were swooping the tip of the line around the edge of the ball. 
  118.  
  119. When you’re finished experimenting, press that tiny round button above the big ball – it restores the orientation to straight up-and-down. This is the way you’ll want to leave this control, unless you want to make a really confusing knot.
  120.  
  121. Here’s the scoop on getting strand previews:
  122.  
  123. • Clicking the black square gives you a preview of the selected strand, but you can see all the strands at once by clicking the pencil button.
  124.  
  125. • The + and - buttons zoom the view in and out. Zoom out far enough, and you’ll see a dark gray rectangle which shows where the edge of the finished drawing will be. If your knot is too big to fit, you can make the drawing bigger or automatically shrink the knot using the Environment window, which is described later on.
  126.  
  127. • The view of the strand is tilted, even though its pole is supposed to be pointing straight up. That’s because there’s another orientation control that affects the whole knot, and it’s presently set at a slight angle. (It’s in the Environment window, explained later.)
  128.  
  129. …And a few words about editing:
  130.  
  131. • You can make new strands  – up to a hundred in one knot – with the New Strand command in the Knots menu.
  132.  
  133. • If you have some text selected, then Cut, Copy, and Clear will work on the text. If you have no text selected, then those commands work on the selected strand. Paste will paste whatever’s on the Clipboard. Confused? Check the names of the commands in the Edit menu – they’ll tell you what will happen next.
  134.  
  135.  
  136. Changing your strand
  137.  
  138. A strand is a path through space. When the knot is drawn, the sphere whose size and colors you chose slides all along this path, sweeping out the shape of the strand.
  139.  
  140. The shape of the path is described in terms of a variable called w; every point along the path has a particular value of w. At the start of the path, w equals zero. All along the path, w increases, up to pi (3.14159…) at the end of the path.
  141.  
  142. There are three rows of text boxes where you can type numbers; these numbers define functions of w which define the shape of the path.
  143.  
  144. The first row of numbers is theta, the longitude. The second row of numbers is the radius, the distance from the knot’s center. The bottom row of numbers is phi, which is the latitude. (Theta and phi are Greek letters used to name angles.)
  145.  
  146. Go to the radius row, and change the second number from 0 to 100, and the fourth number from 0 to 16. Click the bottom preview square, and you should see something like figure 1, a sort of starburst shape seen from an angle.
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156. To the basic radius of 150 pixels, you’ve added a wiggle of 100 * sin (16*w).  Since a sine wave repeats after 2 pi, 16*w is enough to give you eight complete wiggles. And since a sine wave ranges from -1 to +1, the radius of this strand varies from 150-100 = 50 out to 150+100 =250. (If you want to see a sine wave all by itself, choose Sine Wave from the Knots menu.)
  157.  
  158. Try changing the third number in the radius row to 0.5, and click the bottom preview square. (Figure 2.) Now you’ve change the phase of the wiggle – the wiggles all take place slightly ahead of where they did before, and the result is that the whole thing appears to have spun a little. Experiment more if you like.
  159.  
  160. …OK, time to try to try something new. Get your original hoop back by setting the last three numbers in the radius row to zero. (Or create a new strand, using the command in the Knots menu.)
  161.  
  162. Starting with your simple hoop, try changing the phi row (the bottom row) to say 0 + 0.1 pi * sin (0 pi + 14 w), and click the preview. You should get something like figure 3.
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172. This is a lot like before when you added wiggles to the radius, only instead you’re adding wiggles to the latitude. Zero latitude is on the equator; +0.5pi is at the north pole; -0.5 pi is at the south pole. So, 0.1 pi in the equation above is enough to make the wiggles go up and down a fifth of the way toward the poles. The 14*w in the sine part is enough to get you seven complete wiggles.
  173.  
  174. Now change the third number so that you have 0 + 0.1 pi * sin (0.5 pi + 14 w). Click the preview, and you should get figure 4. Like before, with the radius, you’ve changed the phase of the wiggles, and the whole strand seems to have spun.
  175.  
  176. Now, check the checkbox over the word ‘abs’ in the phi row. This will give you the absolute value of the whole sine-wave part: the positive part stays positive, but the negative part becomes positive too. Click on the preview; you can see that all the parts of the wiggle that used to be below the equator have been reflected above it. (Figure 5.)
  177.  
  178. One more thing: Change the first row, theta, to 0 + 1w. Now the strand will only go halfway around. (Figure 6.)
  179.  
  180. (By the way, the zero value of theta is a direction pointing away from you; seen from above the equator, theta goes clockwise as it increases.)
  181.  
  182. Something fancier
  183.  
  184. Remember, you are allowed to type large, negative, fractional, or otherwise weird numbers in your equation. If you type something that isn’t a number at all, though, the program will beep at you and highlight your mistake the next time you try to make a preview or a drawing.
  185.  
  186. Try this: start over with a new strand, a plain hoop. Change the radius to
  187. 80 +150 pi * sin (0 pi + 6 w); preview it. You’ll get figure 7. Because the size of the wiggle, 150, is larger than the constant part, 100, the radius is sometimes negative and passes through the center of the knot. 
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197. Leave the radius like it is, and change the phi row to 0+0.2*sin(0 pi + 12 w). You’ll get figure 8, where the strand is starting to look complicated. Now change the phi row to 0+0.6*sin(0 pi + 12 w). Now the latitude wiggle is more than large enough to take the strand through the north and south poles, like in figure 9.
  198.  
  199. There are many other things to try. For example, if theta is 0 + 4  pi, the strand will go twice around the center. If you then use an odd number times two for the frequencies of the wiggles, with a 0.5 pi offset for the phase of one of the wiggles, you can get a braided effect, as in figure 10. 
  200.  
  201. Theta=   0 + 4w
  202. Radius=200+25* sin(0.5pi + 22w)
  203. Phi=      200+0.07* sin(0pi + 22w)
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213. Here’s how to make any braid you want:
  214.  
  215. Let N be the number of ‘fibers’ in the braid -  in the example above, it’s 2.
  216. Let U be the number of undulations in each fiber - above, it’s 5.
  217. Then fill in the strand definition like this:
  218.  
  219. Theta=   0 + Aw
  220. Radius=? + ?* sin(0.5 pi + B w)
  221. Phi=       ? + ?* sin(0 pi + B w)
  222.  
  223. A=2*N
  224. B=2*U*N+2, and you get to choose the rest.
  225.  
  226. Experiment! You can check out the strands in the example knot files, and edit automagical strands, but the only real way to learn these controls is to try numbers at random and see what happens. If you use the same number of wiggles in both the radius and phi, you will get uniform, symmetrical strands. If you use different but related numbers, like 4 and 8, or 3 and 12, you’ll get something more interesting. Best of all are strands with large wiggles that pass through the center like example 7, or past the poles like example 9.
  227.  
  228. Feel free to type strange, fractional, big, small, or negative numbers wherever you like. The only thing to beware is making a strand that, for example, loops around thousands of times – Knot will draw it, but it will take forever.
  229.  
  230.  
  231. What other controls are there?
  232.  
  233. The environment window
  234.  
  235. Several other windows are available from the Knots menu; choose Environment. This window gives you two more orientation controllers to control the tilt of the whole knot – so you can look at it from a different angle – and the direction of the light, the brightness of the ambient (directionless) light, the kind and color of the backdrop, and the size of the finished picture. If you check the ‘Fit’ checkbox, then the knot will be crushed down to fit inside the size you’ve chosen.
  236.  
  237. If you don’t like any of the available backdrops, you can choose ‘Blank,’ and later use a paint program to select the blank area and replace it. Bear in mind that on a 256-color monitor, the backdrop previews may not be especially accurate.
  238.  
  239. The magic knot window
  240.  
  241. This window creates strands automagically instead of providing fine control. Simply check off the kinds of strands you want, say how many, and click ‘Make.’  
  242.  
  243. The strands you get will probably make a fairly cluttered knot; it’s up to you to winnow what you get until you like the result.
  244.  
  245. The notes window
  246.  
  247. This is a place to write some commentary about your knot.
  248.  
  249. The sine wave window
  250.  
  251. This shows a little graph of a sine wave, just as a convenience.
  252.  
  253. The drawing window
  254.  
  255. At last, you get to draw your knot. If you want the fastest drawing possible, push the slider way up to ‘Monopolize Computer.’ If you are less rushed, and want to use some other program while drawing takes place, push it way down to ‘Cooperate and Run Slower.’ Then click ‘Draw.’ You’ll be asked for a filename for the picture file, and then Knot will draw your picture while a progress meter tells you how it’s coming along. (And if you have not registered Knot, a little reminder appears.)
  256.  
  257. If none of this happens, check the hints in the section titled “I’m having trouble.”
  258.  
  259.  
  260. I’m having trouble. 
  261.  
  262. • Not enough memory: Quit the program, open Knot’s Get Info window in the Finder, and give Knot more memory. If you’re running on a machine with 4 megabytes of RAM, it may help to actually decrease Knot’s allocation to about 2000K. (This gives the rest of the computer more room to breathe.) If neither of these tactics work, try drawing smaller pictures, or open up the Memory control panel and turn virtual memory on. You can also try restarting with all the extensions turned off: hold down the shift key as the computer starts up.
  263.  
  264. • It just beeps a lot and won’t draw anything: You’ve mistyped or left out a number somewhere. Choose Find Typos from the Edit menu, and that will, naturally enough, find the typos. Keep finding and fixing until there are no more left.
  265.  
  266. • Trouble with the Preferences file: Rare, but you may be trying to run Knot from a locked disk. Try copying the program to a different disk, and running it from there.
  267.  
  268. • Previews don’t work: It could be that there’s not enough memory: try the fixes listed for that above. Also, try copying a strand and then pasting it.
  269.  
  270. • Drawing fails after it’s finished: It may be that Knot thought it had enough space on the disk to draw its picture when it began, but during drawing some other program ate up disk space, until there wasn’t enough for the picture. Try running Knot alone, or free up more space on your disk.
  271.  
  272. • Can’t select more than one strand at a time: This version of Knot can’t do that at all. Maybe in the next version.
  273.  
  274.  
  275. What else is there to know?
  276.  
  277. If you register the program, I’ll send you an omnibus disk when it’s ready, full of knots and software and goodies and things. There may be more of these disks in the future. If you have designed a knot that you’d like to be on the omnibus disk, you can e-mail it to me at lloyd@kagi.com. I’ll also send you a code word to banish that reminder window: see the About Knot… item under the apple menu for details.
  278.  
  279. You can also mail me your questions, comments, and complaints. If you have difficulty running Knot on your computer, I’d like to know about that: please describe the problem, your machine, how much memory it has, which version of the Mac OS you’re using, and if you can, all your active control panels, extensions, and startup items – that’s a lot of detail, but subtle conflicts can arise among these and cause problems.
  280.  
  281. Programmers interested in getting pieces of source code can write me; those wanting to know about Kee Nethery’s Kagi Shareware service can write him at kee@kagi.com.
  282.  
  283. Enjoy Knot.
  284.  
  285.  
  286. -Lloyd Burchill
  287.  
  288.  
  289.  
  290.  
  291.